package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 合同对象 sys_contract
 *
 * @author ruoyi
 * @date 2024-11-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_contract")
@Accessors(chain = true)
public class SysContract extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 合同id
     */
    private Long contractId;

    /**
     * 教职工id
     */
    @Excel(name = "教职工id")
    private Long staffId;

    @Excel(name = "教职工名称")
    @TableField(exist = false)
    private String staffName;

    /**
     * 合同名称
     */
    @Excel(name = "合同名称")
    private String name;

    /**
     * 合同开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date contractStartDate;

    /**
     * 合同结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date contractEndDate;

    /**
     * 合同期限(天)
     */
    @Excel(name = "合同期限(天)")
    private Long contractPeriod;

    /**
     * 合同类型 0 正常 1 停用
     */
    private Long type;

    /**
     * 合同状态描述
     */
    @Excel(name = "合同类型")
    @TableField(exist = false)
    private String typeText;

    /**
     * 合同状态描述
     */
    @Excel(name = "合同状态")
    @TableField(exist = false)
    private String statusText;

    /**
     * 上传的合同文件路径
     */
    private String filePath;

}
